﻿<div ms-controller="YBPINDEX">
    <!-- 添加按钮 -->
    <div class="btn-add">
        <a href="###" class="btn btn-info btn-lg" ms-click="AddViewNOWF('FORMBI_LCSPDT')"><i class="iconfont icon-jiahao ft12 mr5"></i>新建关联表</a>
    </div>
    <!-- 按条件选择 -->
    <div class="tab-filter-type">
        <div class="oh">
            <div class="input-group ml15" style="width: 395px;">
                <input type="search" class="form-control" ms-duplex="search.searchcontent" placeholder="搜索表名称">
                <span class="input-group-addon" ms-click="GetLIST()">搜索</span>
            </div>
        </div>
    </div>
    <!-- 表格 -->
    <div class="default-tab ft14 pt20 hover-btn">
        <table class="table table-striped table-responsive table-hover">
            <thead>
                <tr>
                    <th class="tc width-70">
                        序号
                    </th>
                    <th>表名称</th>
                    <th>创建人</th>
                    <th>创建时间</th>
                    <th width="10%">操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ms-repeat-item="YBPList">
                    <td class="tc">
                        {{$index+1}}
                    </td>
                    <td class="lk">{{item.TableDesc}}</td>
                    <td>{{item.CRUser}}</td>
                    <td>{{item.CRDate|date("yyyy-MM-dd HH:mm")}}</td>
                    <td>
                        <span class="btn-click">
                            <a class="cz-btn ft18 bj-color tip" data-toggle="tooltip" title="编辑" target="_blank" ms-attr-href="/ViewV5/AppPage/DATABI/YBZZVUES.html?isshow=1&id={{item.ID}}">
                                <i class="iconfont icon-bianji"></i>
                            </a>
                            <a class="cz-btn ft18 sc-color tip" data-toggle="tooltip" title="删除" ms-click="Del(item)">
                                <i class="iconfont icon-shanchu"></i>
                            </a>
                        </span>
                    </td>
                </tr>
            </tbody>

        </table>
    </div>

 
</div>


<script>

    var tempindex = avalon.define({
        $id: "YBPINDEX",
        YBPList: [],//笔记类别
        InitWigetData: function () {
            $.getJSON('/api/Bll/ExeAction?Action=FORMBI_GETTABLE', {}, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    tempindex.YBPList = resultData.Result;
                }
            })
        },
        addLCSP: function (el) {
            if (el) {
                top.ComFunJS.winviewform("/ViewV5/AppPage/LCSP/LCSPDT.html?ID=" + el.ID + "&r=" + Math.random(), "流程表单", "1000", "");
            } else {
                top.ComFunJS.winviewform("/ViewV5/AppPage/LCSP/LCSPDT.html?r=" + Math.random(), "流程表单", "1000", "");
            }
           
        },
        Del: function (item) {
            top.ComFunJS.winconfirm("确认要删除吗", function () {
                $.getJSON('/api/Bll/ExeAction?Action=DATABI_DELYBDATA', { "P1": item.ID }, function (result) {
                    if (result.ErrorMsg == "") {
                        top.ComFunJS.winsuccess("删除成功");
                        tempindex.YBPList.remove(item);
                    }
                })
            }, function () { })
        }

    })
    //# sourceURL=YBPINDEX.js;
</script>